import { Injectable } from '@angular/core';
import { StateMachineService } from "@farris/command-services";
import { FrameContext } from '@farris/devkit';
import { BefRepository, ResponseInfo } from '@farris/bef';
import { FormMessageService, FormNotifyService, CommandService, FormLoadingService ,BeActionService} from '@farris/command-services';
import { EMPTY, of } from 'rxjs';
import { tap, map, switchMap } from 'rxjs/operators';

@Injectable()
export class SbbyszaddFrmControllerService {
  constructor(
    private frameContext: FrameContext,
    private messageService: FormMessageService,
    private beActionService: BeActionService,
    public stateMachineService: StateMachineService,
    public formNotifyService: FormNotifyService,
    private commandService: CommandService,
    public loadingService: FormLoadingService
  ) {}

  /**
   * 工艺配置改变
   * @remarks 
   * @returns 
   */
  gypzchange(): any {
    const bindingData = this.frameContext.bindingData;
    debugger
    const mainEntity = bindingData.getValue(['bygys']).toJSON();
    if (mainEntity.length === 0) {
        bindingData.setValue(['gy'],false)
    }else{
        bindingData.setValue(['gy'],true)
  }
  }
}
